<%-- 
    Document   : index
    Created on : Oct 1, 2012, 11:47:41 PM
    Author     : MinhThang
--%>

<%@page contentType="text/html" pageEncoding="UTF-8" errorPage="error.jsp"%>
<%@page import="java.sql.*" %>
<%@page import="java.util.*" %>
<%@page import="java.util.List" %>
<%@page import="org.apt.connectDB.Tools"%>
<%@page import="org.apt.Bean.NewEntities" %>
<%@page import="com.myapp.DAO.NewsDao" %>
<%@page import="org.apt.Bean.SeminarEntities" %>
<%@page import="com.myapp.DAO.SeminarDao" %>
<%@page import="org.apt.Bean.LectureEventEntities" %>
<%@page import="com.myapp.DAO.LectureEventDao" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="description" content="website description" />
        <meta name="keywords" content="website keywords, website keywords" />
        <meta http-equiv="content-type" content="text/html; charset=windows-1252" />
        <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Tangerine&amp;v1#" />
        <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz" />
        <link rel="stylesheet" type="text/css" href="style/style.css" />
        <link rel="stylesheet" type="text/css" href="css/layout.css" />
        <link rel="stylesheet" type="text/css" href="css/style6.css" />

        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
        <link rel="stylesheet" type="text/css" href="css/featuredcontentglider.css" />
        <script type="text/javascript" src="js/featuredcontentglider.js"></script>
        <title>Index</title>
    </head>
    <body>
        <div>
            <div><%@include file="UserTemplate/Banner.jsp" %></div>
            <div id="site_content" >
                <div id="content">
                    <div class="contentnews">
                        <div id="container">

                            <div class="KhungFlash">
                                <script type="text/javascript">
                                    featuredcontentglider.init({
                                        gliderid: "canadaprovinces", //ID of main glider container
                                        contentclass: "glidecontent", //Shared CSS class name of each glider content
                                        togglerid: "p-select", //ID of toggler container
                                        remotecontent: "", //Get gliding contents from external file on server? "filename" or "" to disable
                                        selected: 0, //Default selected content index (0=1st)
                                        persiststate: false, //Remember last content shown within browser session (true/false)?
                                        speed: 500, //Glide animation duration (in milliseconds)
                                        direction: "downup", //set direction of glide: "updown", "downup", "leftright", or "rightleft"
                                        autorotate: true, //Auto rotate contents (true/false)?
                                        autorotateconfig: [3000, 50] //if auto rotate enabled, set [milliseconds_btw_rotations, cycles_before_stopping]
                                    })
                                </script>
                                <div id="canadaprovinces" class="glidecontentwrapper">

                                    <div class="glidecontent">
                                        <img class="imgslide" alt="" src="img/imgslide/Slide1.gif"  />
                                    </div>

                                    <div class="glidecontent">
                                        <img class="imgslide" alt="" src="img/imgslide/Slide2.gif"  />
                                    </div>

                                    <div class="glidecontent">
                                        <img class="imgslide"alt="" src="img/imgslide/Slide3.gif"  />
                                    </div>

                                    <div class="glidecontent">
                                        <img class="imgslide" alt="" src="img/imgslide/Slide4.jpg"  />
                                    </div>

                                    <div class="glidecontent">
                                        <img class="imgslide"alt="" src="img/imgslide/Slide5.jpg"  />
                                    </div>

                                    <div class="glidecontent">
                                        <img class="imgslide" alt="" src="img/imgslide/Slide6.jpg"  />
                                    </div>

                                    <div class="glidecontent">
                                        <img class="imgslide"alt="" src="img/imgslide/Slide7.jpg"  />
                                    </div>
                                    <div class="glidecontent">
                                        <img class="imgslide" alt="" src="img/imgslide/Slide8.jpg"  />
                                    </div>
                                    <div id="p-select" class="glidecontenttoggler"></div>
                                </div>
                            </div>
                            <div style="clear: both"></div>
                            <div>
                                <div id="top5new">
                                    <h1>Top News</h1>
                                    <%
                                                List<NewEntities> listnew = NewsDao.getTop5News();
                                                NewEntities news = listnew.get(0);
                                                if (news != null) {
                                    %>
                                    <div>
                                        <div style="width: 23%; float: left"><a id="title" href="NewDetails.jsp?id=<%=news.getNewID()%>"><img class="img"  width="130"height="100" src="images/imagemember/<%=news.getImage()%>" width="150px" height="120px" alt="Not image" /></a></div>
                                        <div style="width: 77%;float: left; vertical-align: top">
                                            <a id="title" href="NewDetails.jsp?id=<%=news.getNewID()%>"><span class="tihle"><%=news.getTile()%></span></a><br>
                                            <span ><%=news.getSummary()%>...</span>
                                            <br><a href="NewDetails.jsp?id=<%=news.getNewID()%>" id="detailnew" style="float: right">view details</a>
                                        </div>
                                    </div>
                                    <div style="clear: both"></div><br>
                                    <div>
                                        <%}
                                                    for (int i = 1; i < listnew.size(); i++) {
                                                        NewEntities newsafter = listnew.get(i);
                                        %><a href="NewDetails.jsp?id=<%=newsafter.getNewID()%>"><img src="images/title-first.png" width="12"height="12">&nbsp;&nbsp;<%=newsafter.getTile()%></a><br><%}%>
                                    </div>
                                    <br>
                                    <img src="images/sperate.png" width="98%" height="2px" />
                                    <h1>Top Seminar</h1>
                                    <%
                                                List<SeminarEntities> lisseminar = SeminarDao.GetSeminarTop5();
                                                SeminarEntities seminar = lisseminar.get(0);
                                                if (news != null) {
                                    %>
                                    <div>
                                        <div style="width: 23%; float: left"> <a id="title" href="SeminarDetails.jsp?id=<%=seminar.getSeminarID()%>"><img class="img" width="130"height="100" src="images/imagemember/<%=seminar.getImage()%>" width="150px" height="120px" alt="Not image" /></a></div>
                                        <div style="width: 77%;float: left; vertical-align: top">
                                            <a id="title" href="SeminarDetails.jsp?id=<%=seminar.getSeminarID()%>"><span class="tihle"><%=seminar.getSeminarName()%></span></a><br>
                                            <span ><%=news.getSummary()%>...</span>
                                            <br><a href="SeminarDetails.jsp?id=<%=seminar.getSeminarID()%>" id="detailnew" style="float: right">view details</a>
                                        </div>
                                    </div>
                                    <div style="clear: both"></div><br>
                                    <div>
                                        <%}
                                                    for (int i = 1; i < lisseminar.size(); i++) {
                                                        SeminarEntities seminarafter = lisseminar.get(i);
                                        %><a href="SeminarDetails.jsp?id=<%=seminarafter.getSeminarID()%>" id="detailnew"><img src="images/title-first.png"  width="12"height="12">&nbsp;&nbsp;<%=seminarafter.getSeminarName()%></a><br><%}%>
                                    </div>
                                    <br><img src="images/sperate.png" width="98%" height="2px" />
                                    <h1>Top Lecture Event</h1>
                                    <%
                                                List<LectureEventEntities> lectureEvent = LectureEventDao.GetTop5LectureEvent();
                                                LectureEventEntities lectureevent = lectureEvent.get(0);
                                                if (news != null) {
                                    %>
                                    <div>
                                        <div style="width: 23%; float: left"><a id="title" href="LectureEventDetails.jsp?id=<%=lectureevent.getEventID()%>"><img class="img"  width="130"height="100" src="images/imagemember/<%=lectureevent.getImage()%>" width="150px" height="120px" alt="Not image" /></a></div>
                                        <div style="width: 77%;float: left; vertical-align: top">
                                            <a id="title" href="LectureEventDetails.jsp?id=<%=lectureevent.getEventID()%>"><span class="tihle"><%=lectureevent.getEventName()%></span></a><br>
                                            <span ><%=lectureevent.getDescription()%>...</span>
                                            <br><a href="LectureEventDetails.jsp?id=<%=lectureevent.getEventID()%>" id="detailnew" style="float: right">view details</a>
                                        </div>
                                    </div>
                                    <div style="clear: both"></div><br>
                                    <div>
                                        <%}
                                                    for (int i = 1; i < lectureEvent.size(); i++) {
                                                        LectureEventEntities lectureEventfter = lectureEvent.get(i);
                                        %><a href="LectureEventDetails.jsp?id=<%=lectureEventfter.getEventID()%>" id="detailnew" ><img src="images/title-first.png"  width="12"height="12">&nbsp;&nbsp;<%=lectureEventfter.getEventName()%></a><br><%}%>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div><%@include file="UserTemplate/MenuRight.jsp"%></div>
            </div>

            <div style="clear: both"></div>
            <div><%@include file="UserTemplate/Footer.jsp"%></div>
        </div>
    </body>
</html>

